package com.luych.toolbox.data.service.dao;

import com.luych.toolbox.common.enums.DataComparePlanStatus;
import com.luych.toolbox.data.service.entity.DataComparePlan;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface DataComparePlanDao extends JpaRepository<DataComparePlan, String>, JpaSpecificationExecutor<DataComparePlan> {

    int countByDataSourceOneIdOrDataSourceTwoId(String dataSourceOneId, String dataSourceTwoId);

    Page<DataComparePlan> findByNameLike(String name, Pageable pageable);

    List<DataComparePlan> findByStatusNot(DataComparePlanStatus status);

}